package cn.com.taiji.pos.mapper;

import cn.com.taiji.pos.entity.SystemPosMachine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * POS机信息 Mapper 接口
 * </p>
 *
 * @author
 * @since 2021-03-01
 */
public interface SystemPosMachineMapper extends BaseMapper<SystemPosMachine> {


    @Select("select spm.id,spm.restaurant_id,sr.code as restaurantCode,sp.code as projectCode from system_pos_machine spm " +
            "inner join system_restaurant sr on sr.id =spm.restaurant_id " +
            "inner join system_project sp on sp.id=sr.project_id " +
            "where spm.PHYSICAL_CODE=#{physicalCode}")
    SystemPosMachine systemPosMachineMapper(String physicalCode);
}
